package com.customer.crm.system.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author Lyp
 * @create 2021/12/20
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Alias("task")
@TableName("tb_crm_task")
public class Task {
    @TableId
    private Integer id;

    @TableField(value = "owner_user_id")
    private String ownerUserId;

    @TableField(value = "about_users")
    private String aboutUsers;

    @TableField(value = "subject")
    private String subject;

    @TableField(value = "due_date")

    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:SS")
    private String dueDate;

    @TableField(value = "status")
    @TableLogic(value = "0" , delval = "1")
    private String status;

    @TableField(value = "priority")
    private String priority;

    @TableField(value = "send_email")
    private String sendEmail;

    @TableField(value = "description")
    private String description;

    @TableField(value = "creator_user_id")
    private String creatorUserId;

    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    private LocalDateTime createDate;

    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    private LocalDateTime updateDate;

    @TableField(value = "isclose")
    private String isclose;

    @TableField(value = "delete_status")
    private String deleteStatus;

    @TableField(value = "delete_user_id")
    private String deleteUserId;

    @TableField(value = "delete_time")
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    private Date deleteTime;


}
